﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Uranus.Common
{
    public class CardCommon
    {
        public static string GetExclusiveCardImg(string cardName)
        {
            return GetExclusiveCardImg(cardName, 1);
        }

        public static string GetExclusiveCardImgJpg(string cardName)
        {
            return GetExclusiveCardImg(cardName, 2);
        }

        public static string GetExclusiveCardImg(string cardName, int cardNum)
        {
            string extension = ".png";
            if (cardNum <= 0)
            {
                //extension = "-1.gif";
                extension = ".gif";
            }
            else if (cardNum == 2)
            {
                extension = ".jpg";
            }
            string strImg = "/Content/img/my-center/pig-phpt" + extension;
            if (cardName.Contains("屌丝卡"))
            {
                strImg = "/Content/img/my-center/pig-phpt-2" + extension;
            }
            else if (cardName.Contains("现金卡"))
            {
                strImg = "/Content/img/my-center/pig-phpt" + extension;
            }
            else if (cardName.Contains("体验卡"))
            {
                strImg = "/content/img/my-center/pig-phpt-10000.jpg";
            }
            else if (cardName.Contains("平民卡"))
            {
                strImg = "/Content/img/my-center/pig-phpt-4" + extension;
            }
            else if (cardName.Contains("土豪卡"))
            {
                strImg = "/Content/img/my-center/pig-phpt-6" + extension;
            }
            else if (cardName.Contains("人品卡"))
            {
                strImg = "/Content/img/my-center/pig-phpt-5" + extension;
            }
            else if (cardName.Contains("暴走卡"))
            {
                strImg = "/Content/img/my-center/pig-phpt-1" + extension;
            }
            else if (cardName.Contains("逆袭卡"))
            {
                strImg = "/Content/img/my-center/pig-phpt-3" + extension;
            }
            else if (cardName.Contains("红包"))
            {
                strImg = "/Content/img/my-center/five-card.png";
            }
            else if (cardName.Contains("红包5元"))
            {
                strImg = "/Content/img/my-center/pig-phpt-23" + extension;
            }
            else if (cardName.Contains("红包10元"))
            {
                strImg = "/Content/img/my-center/pig-phpt-24" + extension;
            }
            else if (cardName.Contains("红包30元"))
            {
                strImg = "/Content/img/my-center/pig-phpt-25" + extension;
            }
            else if (cardName.Contains("红包50元"))
            {
                strImg = "/Content/img/my-center/pig-phpt-26" + extension;
            }
            return strImg;
        }

        public static string GetOrderCardImg(string cardName)
        {

            string strImg = "/Content/img/my-center/pig-phpt.png";
            if (cardName.Contains("屌丝卡"))
            {
                strImg = "/Content/img/order/pig-phpt-2.png";
            }
            else if (cardName.Contains("现金卡"))
            {
                strImg = "/Content/img/order/pig-phpt.png";
            }
            else if (cardName.Contains("体验卡"))
            {
                strImg = "/content/img/order/throunds-card.png";
            }
            else if (cardName.Contains("平民卡"))
            {
                strImg = "/Content/img/order/pig-phpt-4.png";
            }
            else if (cardName.Contains("土豪卡"))
            {
                strImg = "/Content/img/order/pig-phpt-6.png";
            }
            else if (cardName.Contains("人品卡"))
            {
                strImg = "/Content/img/order/pig-phpt-5.png";
            }
            else if (cardName.Contains("暴走卡"))
            {
                strImg = "/Content/img/order/pig-phpt-1.png";
            }
            else if (cardName.Contains("逆袭卡"))
            {
                strImg = "/Content/img/order/pig-phpt-3.png";
            }
            return strImg;
        }
    }
}
